-
Notifications
You must be signed in to change notification settings - Fork 2.3k
feat(rate-limit): better feedback in chat #8503
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found some issues that need attention in this PR.
}, | ||
"rateLimitRetry": { | ||
"title": "Batas kecepatan tercapai — mohon tunggu.", | ||
"waiting": "Mencoba lagi dalam {{seconds}}d", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P3] Indonesian seconds abbreviation: The new rateLimitRetry strings use "{{seconds}}d" (lines 157–161). In this locale other strings use "dtk" for seconds (e.g., followUpSuggest.autoSelectCountdown/countdownDisplay). Suggest changing to "{{seconds}}dtk" for waiting*, waitingWithAttempt*, waitingWithAttemptMax to keep consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found some issues that need attention in this PR.
let rateLimitDelay = 0 | ||
|
||
const sendRateLimitUpdate = async (payload: RateLimitRetryPayload, isPartial: boolean): Promise<void> => { | ||
await this.say("api_req_retry_delayed", undefined, undefined, isPartial, undefined, undefined, { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P2] Mark rate-limit status updates as non-interactive
api_req_retry_delayed is a UI-only status row and shouldn't mutate lastMessageTs. Currently sendRateLimitUpdate calls say() without isNonInteractive, which updates lastMessageTs for new messages in say(). This can interfere with Task.ask's blocking/waiting logic if a status update races with an ask.
Setting isNonInteractive true keeps the message ordering/UI unchanged while avoiding unintended ask lifecycle interactions.
await this.say("api_req_retry_delayed", undefined, undefined, isPartial, undefined, undefined, { | |
await this.say("api_req_retry_delayed", undefined, undefined, isPartial, undefined, undefined, { | |
isNonInteractive: true, | |
metadata: { rateLimitRetry: payload }, | |
}) |
Related GitHub Issue
Closes: #7922
Roo Code Task Context (Optional)
Description
This PR adds a more user friendly UI to display error caused by rate limit.
Test Procedure
Added a test file along with manual instructions.
Pre-Submission Checklist
Screenshots / Videos
Screen.Recording.2025-10-04.at.15.49.48.mov
Documentation Updates
Additional Notes
Get in Touch
@elianiva
Important
Enhances chat UI with a user-friendly rate limit error display, including countdown and retry logic, and updates localization files for multiple languages.
RateLimitRetryRow
component inChatRow.tsx
to display retry status.Task.ts
to handle rate limit retries with countdown and retry logic.chat.json
forid
,it
,ja
,ko
,nl
,pl
,pt-BR
,ru
,tr
,vi
,zh-CN
, andzh-TW
.RateLimitRetryRow.spec.tsx
for testing the new UI component.This description was created by
for 03909fc. You can customize this summary. It will automatically update as commits are pushed.